import React from 'react'
// 8.引入状态
import store from './store'
function List2() {
  return (
    <div>
      {/* 9.渲染数据 */}
      {
        store.getState().list
      }
      {/* 10。变更状态 */}
      <button onClick = {
          () => {
            store.dispatch({
              type: 'CHANGE_LIST',
              payload: [7, 8, 9]
            })
          }
        }>改变为 789</button>
    </div>
  )
}

export default List2
